Methods and apparatus for optimizing the distribution of trading executions

ABSTRACT

The present invention relates to electronic trading of securities. In some embodiments, the present invention relates to methods and apparatus for optimizing the distribution of trading executions in an investor&#39;s accounts. Pursuant to some embodiments, an integer allocation algorithm is provided.

RELATED APPLICATIONS

This application claims priority to and benefit of U.S. Provisional Patent Application Ser. No. 60/667,474, filed on Apr. 1, 2005, the contents of which are hereby incorporated herein for all purposes.

FIELD

The present invention relates to electronic trading of securities

BACKGROUND

A primary function of brokerage firms is to conduct trades on behalf of clients. From an information flow perspective, trading at a brokerage firm includes steps of collecting orders from clients to buy or sell various financial products and placing these orders on a specified stock exchange. Each client may have multiple brokerage accounts open at a brokerage firm so the trading must specify which account a trade is associated with Once an order is placed, it may be executed (e.g., by the selected stock exchange's matching engine). The executions are captured by the brokerage firm's trading system and the executed quantities from each financial product must be allocated fairly on the client's accounts. That is, they must be allocated based on the ordered quantity per account (as specified by the client at the time of placing the order).

Some orders may be fully executed, while others may be partially executed or not executed at all. If the entire ordered quantity it is executed (fully or partially) at a unique price, then allocation is straightforward—the executed quantity will be allocated on the client's accounts proportionate to the quantity demanded by the client in each of its accounts.

However, often there is a price breakdown associated with an order. That is, total ordered quantity is fully or partially executed at multiple prices. Such situations give rise to an integer allocation problem that requires optimization. Pursuant to some embodiments, an optimization algorithm is provided to achieve an average price per account as close as possible to each other (and to the overall weighted average price), with respect to the initial demanded quantity per account.

The problem is exacerbated because, in general, no satisfactory polynomial algorithm has been discovered that can be used in integer linear programming. Generally, the practical experience shows that large-scale integer linear programs seem as yet practically unsolvable or extremely time-consuming. The algorithm and embodiments described herein provide an alternative approach to the problem and provide desirable results.

BRIEF DESCRIPTION OF THE DRAWING

FIG. 1 is a block diagram of a system consistent with the present invention.

FIG. 2 is a flow diagram consistent with some embodiments.

FIG. 3 is a flow diagram consistent with some embodiments.

FIG. 4 is block, diagram of a portion of a system consistent with some embodiments.

DESCRIPTION

Applicant has recognized that there is a need for an improved system, method, apparatus, computer program code, and means for allocating an executed order among a plurality of customer accounts. In some embodiments, the present invention relates to methods and apparatus for optimizing the distribution of trading executions in investor accounts. Pursuant to some embodiments, an integer allocation algorithm is provided.

For the purposes of describing features of embodiments of the present invention, a number of terms are used herein. For example, the terms “client”, “customer” or “investor” are generally used interchangeably to refer to an individual or entity that has provided instructions to execute a trade on its behalf.

As used herein, the term “optimization algorithm” is used o refer to a numerical method or algorithm for finding a value x such that f(x) is as small (or as large) as possible, for a given function f; possibly with some constraints on x. As used herein, the term “Tabu search” refers to a mathematical optimization method that generally enhances the performance of a local search method by using memory structures.

As used herein, the term“simulated annealing” is used to refer to a global optimization technique which traverses the search space by generating neighbouring solutions of the current solution.

In general, and for the purposes of introducing concepts of embodiments of the present invention, customer orders are allocated among customer accounts pursuant to embodiments of the present invention as follows. A customer who has multiple accounts at a brokerage firm places a trade order. When the trade order is executed, the executed quantities are fairly allocated on the customer's accounts pursuant to allocation instructions provided by the customer. In situations where the total ordered quantity is partially executed at multiple prices, an allocation problem arises. Embodiments of the present invention address the allocation problem by first determining the quantity of the orders that are to be allocated to each account. In some embodiments, this is done on a pro-rata basis.

Embodiments then arrange execution price data associated, with the executed orders into separate lists or subsets. In one embodiment, price data is sorted into two lists or subsets, although those skilled in the art will appreciate that different numbers (so long as there are at least two) may be used. Once the price data has been sorted into lists or subsets so that the executed prices are distributed across the subsets, the solution is improved iteratively so that the executed prices are sorted in the best fashion possible. In this manner, embodiments efficiently and accurately allocate executed prices across different accounts. Further, embodiments allow this efficient and accurate allocation to be done programmatically; something that prior approaches were unable to do effectively because there is generally no polynomial algorithm for such integer linear programming problems.

Pursuant to some embodiments, a system, method, means, and computer program code for generating an initial optimization are provided which include distributing two lists of executed prices, including a first list of executed prices under an overall weight price, and a second list of executed prices above the overall weight price, and distributing the prices over the customers accounts such that at each iteration the executed prices that is the closest distance between the average price of a given account and the overall average is selected.

Features of some embodiments of the present invention will now be described by first referring to FIG. 1 where a block diagram of one embodiment of a trading network 100 is shown. As shown, trading network 100 includes a number of different components which cooperatively operate to process, route and execute securities trading orders pursuant to some embodiments of the present invention. In general, features of some embodiments may be implemented in a trading environment such as the trading environment shown in FIG. 1. For example, features of some embodiments may be used to allocate executed orders across a number of accounts held by a customer such as customer 104 a.

As depicted, trading network 100 includes a trading system 102 in communication with one or more customer(s) 104, a plurality of order destinations 106, a source 108 of order destination data, and one or more operator devices 109 (only one shown). Trading, system 102, in some embodiments, includes additional components (not shown), such as an execution core, order routing functions, storage capabilities, etc. The execution core may be any trading execution software, systems and/or devices which are configured to receive customer orders and process them to execute orders on behalf of customers. In some embodiments, the execution core may function to timestamp orders when received and to assign an order identifier or sequence number to each order.

Some routing software or functionality may also be provided to receive n order from the execution core or to receive information about an order and to make a determination as to how the order is to be routed. Code, rules, or other components may be provided to implement the optimization and other algorithms described above to distribute trading executions in customer accounts. Pursuant to some embodiments, trading system 102 includes, or has access to, a plurality of trading accounts associated with customers 104.

Although a single trading system 102 is shown in FIG. 1, any number of trading systems may be included in trading network 100. Similarly, any number of data sources 108, customer devices 104, order destinations 106, operator devices or any other device described herein may be included in the trading network 100 according to embodiments of the present invention.

Each of the devices of trading network 100 may be formed of components or other devices capable of performing the various functions described herein. For example, a customer device 104 may be a computing device such as a Personal Computer (PC), a laptop, a telephone, or other device associated with a customer. As used herein, the term “customer” may refer to, for example, an individual or other entity that buys and sells securities (and pursuant to some embodiments of the present invention, options; for purposes of this disclosure and the appended claims “securities” will be understood to include options). For example, a customer operating a customer device may be a broker or other entity desiring to purchase or sell securities using features of embodiments of the present invention. The broker or other entity may be operating on behalf of the ultimate purchaser or seller of the securities.

An order destination 106 may include any computing device(s) operated by or on behalf of one or more order destinations. Each of the order destinations may be in communication with other devices described herein, such as the data source 108, using techniques known in the art. In general, the data source 108 may receive information from the order destinations 106 upon the occasion of each order received by the order destinations and/or after the completion of each trading transaction, Each order destination 106 may include one or more operator terminals allowing specialists or traders at the order destination to respond to orders received and to complete execution of an order pursuant to its terms.

Operator device 109 may, for example, be constituted by a computer terminal or by a computing device such as a PC or a laptop in communication with the trading system 102.

As used herein, devices (e.g., trading system 102, operator device 109, order destinations 106, customer devices 104 and data sources 108) may communicate, for example, via one or more communication networks. For example, some or all of the devices may be in communication via an Internet Protocol (IP) network such as the Internet. Some or all of the devices may be in communication via other types of networks such as an intranet, a Local Area Network (LAN), a Metropolitan Area Network (MAN), a Wide Area Network (WAN), a proprietary network, a Public Switched Telephone Network (PSTN), and/or a wireless network.

According to some embodiments of the present invention, communication between some or all of the devices of trading network 100 may be via temporary computer communication channel (e.g., a logic path through which information can be exchanged). In other words, the communication channel between various devices may be established and discontinued as appropriate. For example, trading system 102 may exchange information with one of the order destinations 106 only when communication is necessary to transmit an order for execution by the order destination 106 or to receive confirmation from the order destination 106 that the order was executed.

According to some embodiments, some or all of the devices may communicate with other devices via a public computer communication network. That is, at least a portion of the communication network may be accessed by devices other than the devices depicted in FIG. 1. Note, however, that the information exchanged between trading system 102 and other devices in FIG. 1 may be encrypted or otherwise protected to prevent a third party from accessing, manipulating, understanding and/or misusing the information. In some embodiments, some or all of the devices may communicate over a private network.

In other embodiments, the devices of FIG. 1 are connected differently than as shown. For example, some or all of the devices may be connected indirectly to one another (e.g., via the Internet). Of course, embodiments of the invention may include devices that are different from those shown. It should also be noted that although the devices are shown in communication with each other, the devices need not be constantly exchanging data. Rather, communication may be established when necessary and severed at other times or always available but rarely used to transmit data. Moreover, although the illustrated communication links appear dedicated, it should be noted that each of the links may be shared by other devices. Features of some embodiments may be used to allocate executed orders across a number of accounts held by a customer such as customer 104 a.

In some embodiments, the allocation is performed programmatically using, for example, a computing device associated with or in communication with trading system 102. The allocation may be performed on a real-time basis (e.g., upon completion of a trade requiring allocation), or on a batch or daily basis. Further details of such a computing device will be provided below in conjunction with a description of FIG. 4. First, however, reference is made to FIG. 2 where a process 200 is shown for trade processing. The flow chart in FIG. 2 and the flow charts in other figures described herein do not imply a fixed order to the steps, and embodiments of the present invention can be practiced in any order that is practicable. Some or all of the steps of the process shown in FIG. 2 may be performed, for example, by a trading system such as the trading system 102 of FIG. 1. In some embodiments, some of the steps of the process are performed by an allocation system such as the system 400 of FIG. 4.

Process 200 begins at 202 where a trade order is received. For example, the trade order may be received at trading system 102 in any of a number ways commonly known in the art. The trade order may be received from a customer having a number of accounts at, for example, a brokerage. The customer may also provide allocation instructions associated with the execution of the order. For example, if the customer has four accounts, the customer may indicate that the executed quantifies be allocated in a certain way across those four accounts.

Processing continues at 204 where price breakdowns associated with the trade order are identified. Price breakdowns are identified, for example, during or after the execution (or attempted execution) of an order. As discussed above, price breakdown occurs when the total ordered quantity is fully or partially executed at multiple prices. Pursuant to some embodiments, this price breakdown may be identified by the trading system (such as trading system 102) or after processing by a system such as the allocation system 400 of FIG. 4.

Processing continues at 206 where features of embodiments of the present invention are used to optimize trade allocation associated with the order. In general, embodiments utilize a multi-step process that includes an iterative improvement to a distribution. Further details of the multi-step process will be provided below in conjunction with FIG. 3.

Once the trade allocation among the various accounts has been optimized, processing continues to 208 where the distribution is performed. For example, the distribution may be performed by a trading system such as the trading system 102 of FIG. 1. The distribution may also be performed by a brokerage computing system or some other system or device. The end result is an efficient and accurate allocation and distribution of executed orders among various accounts.

Trade allocation processing pursuant to embodiments of the present invention will be described in conjunction with FIG. 3. Prior to a discussion of FIG. 3, a brief introduction to the algorithms and nomenclature will first be provided. As discussed above, in general, there is no polynomial algorithm that is satisfactory for integer linear programming (e.g., a problem which is NP-complete). In general, the existing large-scale integer linear programs are practically unsolveable or extremely time-consuming. The algorithm described for use in conjunction with embodiments herein provides an alternative approach to the problem.

Given a set of n accounts that an investor or customer may have open with a brokerage firm, the following discussion provides an introductory description of the manner in which the investor wants to distribute the total quantity of an order placed for a certain financial product on the accounts opened with the brokerage. Formula (1) describes the order (where Q is the total ordered quantity), and the accounts and allocation is shown by Formula (2) (also referred to as the breakdown scheme or allocation instructions).

$\begin{matrix} {{Q = {\sum\limits_{i = 1}^{n}q_{j}}},} & (1) \\ {\begin{bmatrix} A_{1} & A_{2} & A_{3} & \ldots & A_{n} \\ q_{1} & q_{2} & q_{3} & \ldots & q_{n} \end{bmatrix},} & (2) \end{matrix}$

On the market or exchange, the total ordered quantity may be executed in multiple portions (tranches or blocks) at different prices as show in Formula (3):

$\begin{matrix} {\begin{bmatrix} \left( {p_{1},e_{1}} \right) \\ \left( {p_{2},e_{2}} \right) \\ \left( {p_{3},e_{3}} \right) \\ \vdots \\ \left( {p_{m},e_{m}} \right) \end{bmatrix},{{where}\left( {p_{1},e_{1}} \right)},{i = \overset{\_}{1,m}}} & (3) \end{matrix}$

The pairs (p_(i), e_(i)) are the pair of the executed quantity (e_(i)) and the executed price (p_(i)) and where m is the number of executions received from the market for the corresponding order. The following condition, shown as Formula (4), is in place:

$\begin{matrix} \begin{matrix} {{0 \leq {\sum\limits_{i = 1}^{m}e_{i}}} = {E \leq Q}} \\ {= {\sum\limits_{j = 1}^{n}q_{j}}} \end{matrix} & (4) \end{matrix}$

where E is the total executed quantity That is, as described above, an order may be fully executed, partially executed or not executed at all. Pursuant to some embodiments, a solution is provided for the integer allocation problem of finding the appropriate distribution D of the executed quantities in the investors' accounts, based on the investor's allocation instructions. The solution provides—for each account—the closest average price to the overall average, Put another way, the solution minimizes the function shown in Formula (5):

$\begin{matrix} {{o = {\sum\limits_{j = 1}^{n}{\left( {\overset{\_}{p} - \overset{\_}{p_{j}}} \right)}}},} & (5) \end{matrix}$

Where |( p− p_(j) )| is the absolute value of Formula (6):

$\begin{matrix} {\left( {\overset{\_}{p} - \overset{\_}{p_{j}}} \right),{\overset{\_}{p_{j}} = \frac{\sum\limits_{i = 1}^{m}\left( {p_{i} \times a_{ij}} \right)}{\sum\limits_{i = 1}^{m}a_{ij}}}} & (6) \end{matrix}$

and is the average price per account, and

$\begin{matrix} {\overset{\_}{p} = \frac{\sum\limits_{i = 1}^{m}\left( {p_{i} \times e_{i}} \right)}{\sum\limits_{i = 1}^{m}e_{i}}} & (7) \end{matrix}$

is the overall average price, as shown in Formula (8), below:

$\begin{matrix} \begin{bmatrix} \; & \; & A_{1} & A_{2} & \ldots & A_{n} \\ \; & \; & \; & \; & \; & \; \\ \left( {p_{1},{e\; 1}} \right) & \; & a_{11} & a_{12} & \ldots & a_{1n} \\ \left( {p_{2},e_{2}} \right) & {D =} & a_{21} & a_{22} & \ldots & a_{2n} \\ \vdots & \; & \vdots & \vdots & \vdots & \vdots \\ \left( {p_{m},e_{m}} \right) & \; & a_{m\; 1} & a_{m\; 2} & \ldots & a_{mn} \\ \; & \; & \; & \; & \; & \; \\ \overset{\_}{p} & \; & \overset{\_}{p_{1}} & \overset{\_}{p_{2}} & \ldots & \overset{\_}{p_{n}} \end{bmatrix} & (8) \end{matrix}$

With this background and context, reference is now made to FIG. 3 where a process 300 is shown for trade allocation processing. Some or all of the steps of the process shown in FIG. 3 may be performed, for example, by, a system such as the allocation system 400 of FIG. 4. In some embodiments, some or all of the steps of the process may be performed by a trading system such as the trading system 102 of FIG. 1.

Allocation processing may begin once a price breakdown has been associated with an order (e.g., in real time, or in a batch process at the end of day). Allocation processing begins at 302 where the total executed quantity of a trade order is allocated proportionally on accounts based on the customer's allocation instructions. For example, the total executed quantity is allocated proportionally on the customer's accounts on a pro-rata basis. In one embodiment, processing at 302 includes determining a pro-rata coefficient for each customer account. Formula (9) illustrates one embodiment of such a determination.

$\begin{matrix} {{{0 \leq c_{j}} = {\frac{q_{j}}{\sum\limits_{j = 1}^{n}q_{j}} \leq 1}},{j = {\overset{\_}{1,n}.}}} & (9) \end{matrix}$

In this illustrative embodiment, the coefficients represent the proportional number of executed orders or lots that have to be allocated per account from each execution, according to the customer's allocation instructions.

Once this coefficient has been determined, processing continues where a calculation is performed to identify the percentage the demanded quantity has been satisfied for each account. Formula (10) illustrates one embodiment of this calculation (where

c_(j)

is the integer part of c_(j) (truncation)):

$\begin{matrix} {{f_{j} = {\frac{\left( {q_{j} - {\langle c_{j}\rangle}} \right)}{q_{j}} \times 100}},{j = {\overset{\_}{1,n}.}}} & (10) \end{matrix}$

The remaining or residual quantity per account is then shown by Formula (11):

r _(j) =q _(j) −

c _(j)

,j= 1,n .  (11)

And the total remaining quantity to be allocated is expressed by Formula (12):

$\begin{matrix} {R = {{\sum\limits_{i = 1}^{n}\left( {q_{j} - {\langle c_{j}\rangle}} \right)} = {\sum\limits_{i = 1}^{n}{r_{j\;}.}}}} & (12) \end{matrix}$

In addition, each account may be assigned a certain priority t_(j) j= 1,n. The tableau shown as Formula (13) describes the above-mentioned correspondences:

$\begin{matrix} \begin{bmatrix} A_{1} & A_{2} & A_{3} & \ldots & A_{n} \\ q_{1} & q_{2} & q_{3} & \ldots & q_{n} \\ \; & \; & \; & \; & \; \\ c_{1} & c_{2} & c_{3} & \ldots & c_{n} \\ f_{1} & f_{2} & f_{3} & \ldots & f_{n} \\ r_{1} & r_{2} & r_{3} & \ldots & r_{n} \\ \; & \; & \; & \; & \; \\ t_{1} & t_{2} & t_{3} & \ldots & t_{n} \end{bmatrix} & (13) \end{matrix}$

Put another way, processing at 302 includes the calculation of a pro-rata allocation follows in Formulas (14)-(21):

$\begin{matrix} \begin{matrix} c_{j} & {{j = \overset{\_}{1,n}},} \end{matrix} & (14) \\ \begin{matrix} \left. A_{j}\leftarrow{E \times c_{j}} \right. & {j = \overset{\_}{1,n}} \end{matrix} & (15) \\ \begin{matrix} {f_{j},r_{j}} & {j = \overset{\_}{1,n}} \end{matrix} & (16) \\ {\left. R\leftarrow{{\sum\limits_{i = 1}^{n}{r_{j}\mspace{14mu} {while}\mspace{14mu} R}} > 0} \right.\left( \begin{matrix} {{\begin{matrix} \left( {f_{j},r_{j},t_{j}} \right) & {j = \overset{\_}{1,n}} \end{matrix}\mspace{445mu} (18)}\left. k\leftarrow{\min\limits_{{j = 1},n}{\left\{ {t_{j} \otimes {\max\limits_{j = \overset{\_}{1,n}}\left\{ {r_{j} \otimes {\min\limits_{j = \overset{\_}{1,n}}\left\{ f_{j} \right\}}} \right\}}} \right\} \mspace{295mu} (19)}} \right.\left. A_{k}\leftarrow{A_{k} + {{ls}{\quad\; \left( {{where}\mspace{14mu} {ls}\mspace{14mu} {is}\mspace{11mu} {the}\mspace{14mu} {lot}\mspace{14mu} {size}\mspace{14mu} {specific}\mspace{14mu} {to}\mspace{14mu} {the}\mspace{14mu} {financial}\mspace{14mu} {product}} \right)}}} \right.} \end{matrix} \right.} & (17) \\ {f_{k},r_{k}} & (20) \\ \left. R\leftarrow{R - {ls}} \right. & (21) \end{matrix}$

Where Formula (14) results in a determination of the coefficient, Formula (15) distributes the total executed amount proportionally, Formula (16) determines the percentage the demanded quantity has been satisfied, and Formulas (18)-(20) determine the account that will receive one of the remaining lots based on certain criteria.

At this point, processing of 302 is complete, and a quantity to be allocated to each account has been determined. Processing continues at 304 where an initial distribution is constructed by distributing the executed prices in at least two lists. Put another way, the data is arranged based on a strategy consistent with the objective function. In general, the executed prices are sorted in ascending order of their absolute distance from the overall average as shown in Formula (22):

p ,l_(i)=|(p _(i) −p)|,i= 1,m .  (22)

Once the prices are sorted, in some embodiments, two subsets of prices are created: (1) those that are less or equal than the overall average p, and (2) those that are greater than the average. These subsets are shown by Formula (22):

U=(p _(k) :p _(k) ≦ p,1≦k≦m)

V=(p _(k′) :p _(k′) > p,1≦k′≦m)

The strategy, in some embodiments, is to allocate the closest prices to the overall average to the accounts that have the least demand, while the accounts with a greater demand will have a higher probability to receive prices that will compensate each other. If there are multiple accounts with the same demanded quantity, they will receive one lot size at a time from the same executed price till the corresponding executed quantity is exhausted. The general algorithm is described below algorithm is described below by Formulas (23)-(30);

$\begin{matrix} {{l_{i} = {\left( {p_{i} - \overset{\_}{p}} \right)}},{i = {\overset{\_}{1,m}.}}} & (23) \\ \left. \overset{\_}{p_{j}^{c}}\leftarrow{\min\limits_{{i = 1},m}\left\{ {l_{i};{e_{i} > 0}} \right\}} \right. & (24) \\ {\left. \overset{\_}{p_{j}^{n}}\leftarrow{\min\limits_{\underset{p_{i} \in V}{p_{k} \in U}}\left\{ \frac{\left( {\overset{\_}{p_{j}^{c}} \times a_{j}^{c}} \right) + \left( {p_{k} \times {ls}} \right)}{a_{j}^{c} + {ls}} \right\}} \right.\left( {{{where}\mspace{14mu} {ls}{\mspace{11mu} \;}{is}\mspace{14mu} {the}\mspace{11mu} {lot}\mspace{14mu} {size}\mspace{14mu} {specific}\mspace{14mu} {to}\mspace{14mu} {the}\mspace{14mu} {financial}\text{}{product}},{a_{j} = {\sum\limits_{i = 1}^{m}{a_{ij}\mspace{14mu} {is}\mspace{14mu} {the}\mspace{14mu} {total}\mspace{14mu} {allocated}\mspace{14mu} {quantity}\mspace{14mu} {in}\mspace{14mu} {account}A_{j}}}},{{and}\mspace{14mu} \overset{\_}{p_{j}^{n}}},{\overset{\_}{p_{j}^{c}}\mspace{14mu} {are}\mspace{14mu} {the}\mspace{14mu} {new}\mspace{14mu} {and}\mspace{14mu} {the}\mspace{14mu} {current}\mspace{14mu} {average}\text{}{price}\mspace{14mu} {per}\mspace{14mu} {account}},{respectively},} \right.} & (25) \\ \left. a_{kj}^{n}\leftarrow{a_{kj}^{c} + {{{ls}\left( {{where}\mspace{14mu} a_{kj}^{n}\mspace{14mu} {is}\mspace{14mu} {the}\mspace{14mu} {new}\mspace{14mu} {quantity}\mspace{14mu} {in}\mspace{14mu} {allocated}{\mspace{14mu} \mspace{11mu}}{account}\mspace{14mu} A_{j}{\mspace{11mu} \;}{at}\mspace{14mu} {price}\mspace{14mu} p_{k}} \right)}.}} \right. & (26) \\ {j \in \left\{ {{{x\text{:}\mspace{14mu} q_{j}} = q_{x}},{1 \leq x \leq n}} \right\}} & (27) \\ {\left. a_{j}^{n}\leftarrow{a_{j}^{c} + {{ls}\left( {{where}\mspace{14mu} a_{j}^{n}\mspace{14mu} {is}\mspace{14mu} {the}\mspace{14mu} {new}\mspace{14mu} {total}\mspace{14mu} {allocated}\mspace{14mu} {quantity}\mspace{14mu} {in}\mspace{14mu} {account}\mspace{14mu} A_{j}} \right)}} \right.,} & (28) \\ {j \in \left\{ {{{x\text{:}\mspace{14mu} q_{j}} = q_{x}},{1 \leq x \leq n}} \right\}} & (29) \\ \left. e_{k}\leftarrow{e_{k} - {{ls}\left( {{where}\mspace{14mu} e_{k}\mspace{14mu} {is}\mspace{14mu} {the}\mspace{14mu} {remaining}\mspace{14mu} {quantity}\mspace{14mu} {at}\mspace{14mu} {price}\mspace{14mu} p_{k}} \right)}} \right. & (30) \end{matrix}$

Where Formulas (23)-(27) are reiterated from j←1 to n and result in an initialization of the current local average price for which there is an executed quantity available, and search for the price which provides the least impact on the local average (in both subsets U and V). At this point, processing 304 complete and a solution for the larger integer allocation problem has been found. This solution is used as an initial base for the optimization of 306.

Processing at 306 includes iteratively improving the distribution to improve the objective function, which is shown as Formulas (31) and (32):

$\begin{matrix} {{{O = {\min \left\{ {\sum\limits_{j = 1}^{n}{\Delta_{j}}} \right\}}},{where}}{{\Delta_{j} = {\frac{\overset{\_}{p_{j}}}{\overset{\_}{p}} - {1\mspace{14mu} \left( {j = \overset{\_}{1,n}} \right)}}},}} & (31) \end{matrix}$

and |Δ_(j)| is the absolute value of Δ_(j).

$\begin{matrix} \begin{bmatrix} \; & \; & A_{1} & A_{2} & \ldots & \; & \; & \; & \ldots & A_{n} \\ \; & \; & \; & \; & \; & \; & \; & \; & \; & \; \\ \left( {p_{1},e_{1}} \right) & \; & a_{11} & a_{12} & \ldots & \; & \; & \; & \ldots & a_{1n} \\ \left( {p_{2},e_{2}} \right) & \; & a_{21} & a_{22} & \ldots & \; & \; & \; & \ldots & a_{2n} \\ \vdots & \; & \vdots & \vdots & \; & \vdots & \; & \vdots & \; & \vdots \\ \; & \; & \; & \; & \ldots & {fromX} & \rightarrow & {toY} & \ldots & \; \\ \; & {D =} & \; & \; & \; & \vdots & \; & \vdots & \; & \; \\ \; & \; & \; & \; & \ldots & {toX} & \leftarrow & {fromY} & \ldots & \; \\ \vdots & \; & \vdots & \vdots & \; & \vdots & \; & \vdots & \; & \vdots \\ \left( {p_{n},e_{n}} \right) & \; & a_{m\; 1} & a_{m\; 2} & \ldots & \; & \; & \; & \ldots & {a_{mn}\;} \\ \; & \; & \; & \; & \; & \; & \; & \; & \; & \; \\ \overset{\_}{p} & \; & \overset{\_}{p_{1}} & \overset{\_}{p_{2}} & \ldots & \; & \; & \; & \ldots & \overset{\_}{p_{n}} \\ \; & \; & \Delta_{1} & \Delta_{2} & \ldots & \; & \; & \; & \ldots & \Delta_{n} \end{bmatrix} & (32) \end{matrix}$

The algorithm is to identify a pair of accounts between which one lot size can be swapped, at different prices, so that the value of the objective function drives the searching toward the optimal solution or toward a close vicinity of the optimal, as shown in Formulas (33)-(36) (where Formula (36) is a series of formulas)

$\begin{matrix} \left. O_{best}\leftarrow{\max \left\{ {double} \right\}} \right. & (33) \\ {\Delta_{j}^{c} = {\frac{{\overset{\_}{p}}_{j}}{\overset{\_}{p}} - {1\left( {j = \overset{\_}{1,n}} \right)}}} & (34) \\ \left. O_{c}\leftarrow{\sum\limits_{j = 1}^{n}{{\Delta_{j}^{c}}\left( {{the}\mspace{14mu} {current}\mspace{14mu} {objective}\mspace{14mu} {function}} \right)}} \right. & (35) \\ {{determine}\left\{ {\left( {{\min \; {Row}},{\min \; {Col}}} \right),\left( {{\max \; {Row}},{\max \; {Col}}} \right)} \right\}} & (36) \end{matrix}$

$\begin{matrix} {{if}\mspace{14mu} {have}\mspace{14mu} {swap}} & \; \\ \left\{ \begin{matrix} {{while}\mspace{14mu} {not}{\mspace{11mu} \;}{optim}} \\ \left( \begin{matrix} {{make}\mspace{14mu} {the}\mspace{14mu} {interchange}\mspace{14mu} {and}\mspace{14mu} {determine}\mspace{14mu} {the}\mspace{14mu} {new}{\mspace{11mu} \;}{deltas}\mspace{20mu} {\Delta_{j}^{n}\left( {j = \overset{\_}{1,n}} \right)}} \\ \left. O_{n}\leftarrow{\sum\limits_{j = 1}^{n}{{\Delta_{j}^{n}}\left( {{the}\mspace{14mu} {next}\mspace{14mu} {objective}\mspace{14mu} {function}} \right)}} \right. \\ {{{if}\mspace{14mu} O_{n}} \geq O_{c}} \\ \left( \begin{matrix} {{{if}\mspace{14mu} O_{n}} \leq O_{best}} \\ {\left. O_{best}\leftarrow O_{c} \right.,{{clear}\mspace{14mu} {the}\mspace{14mu} {objective}\mspace{14mu} {function}\mspace{14mu} {history}}} \\ {{{if}\mspace{14mu} \left( {O_{n} - O_{best}} \right)} < {{Annealing}\mspace{14mu} {Temperature}}} \\ \left( \begin{matrix} {{if}\mspace{14mu} {Annealing}\mspace{14mu} {Temperature}{\mspace{11mu} \;}{is}\mspace{14mu} {tuned}} \\ {{warm}\mspace{14mu} {up}} \\ {else} \end{matrix} \right. \\ {{{tune}\mspace{14mu} {the}\mspace{14mu} {Annealing}\mspace{14mu} {Temperature}},{{and}\mspace{14mu} {cool}\mspace{14mu} {down}}} \end{matrix} \right. \\ {else} \\ \left. {optim}\leftarrow{true} \right. \\ {{{else}\mspace{14mu} {if}\mspace{14mu} O_{n}} \leq O_{best}} \\ {\left. O_{best}\leftarrow O_{n} \right.,{{clear}\mspace{14mu} {the}\mspace{14mu} {objective}\mspace{14mu} {function}\mspace{20mu} {history}}} \\ {{if}\mspace{14mu} {optim}} \\ {{swap}\mspace{14mu} {back}\mspace{14mu} {the}\mspace{14mu} {previously}\mspace{14mu} {interchanged}\mspace{14mu} {quantities}} \\ {else} \end{matrix} \right. \end{matrix} \right. & \; \\ {\mspace{79mu} \left( {\begin{matrix} \begin{matrix} \left. O_{c}\leftarrow O_{n} \right. \\ {{append}\mspace{14mu} {the}\mspace{14mu} {moves}\mspace{14mu} {to}\mspace{14mu} {the}\mspace{14mu} {Tabu}\mspace{14mu} {List}} \end{matrix} \\ {{remove}\mspace{14mu} {the}\mspace{14mu} {moves}\mspace{14mu} {older}\mspace{14mu} {than}\mspace{14mu} {the}{\mspace{11mu} \;}{Tabu}\mspace{14mu} {List}\mspace{14mu} {length}} \\ {{preserve}\mspace{14mu} {the}\mspace{14mu} {current}\mspace{14mu} {objective}\mspace{14mu} {function}\mspace{14mu} {data}\mspace{14mu} {in}\mspace{14mu} {the}\mspace{14mu} {history}} \\ {{determine}\left\{ {\left( {{\min \; {Row}},{\min \; {Col}}} \right),\left( {{\max \; {Row}},{\max \; {Col}}} \right)} \right\}} \\ {{if}\mspace{14mu} {have}\mspace{14mu} {swap}} \end{matrix}\mspace{140mu} {warm}\mspace{14mu} {up}\mspace{85mu} {else}\mspace{135mu} {optim}}\leftarrow{{{true}{if}\mspace{14mu} O_{best}} < {O_{c}\mspace{34mu} {go}\mspace{14mu} {back}\mspace{14mu} {in}{\mspace{11mu} \;}{the}\mspace{14mu} {history}\mspace{14mu} {to}\mspace{20mu} {the}\mspace{14mu} {best}\mspace{14mu} {found}\mspace{14mu} {objective}\mspace{14mu} \mspace{34mu} {{function}({solution})}}} \right.} & \; \end{matrix}$

Note that at each step the value of the objective function does not need necessarily to be less than at the previous step (that would be a simple Greedy or Steepest Ascent strategy). Using a Simulating Annealing approach, the algorithm allows relaxation, for escaping from the trap of local optimums, and for redirecting the search, within the space of the solutions, toward the global optimum proximity.

However, allowing relaxation opens the possibility of cycling. Introducing a Tabu List the search acquires a short-term memory, which prevents going back down the paths that have been already explored In some embodiments, the Tabu List stores a triad of data, including: account FROM, account TO, and price AT.

Pursuant to some embodiments, a procedure of the algorithm is to determine between which accounts, and at what prices a swap can be made at a given point. In some embodiments, a Min-Max strategy is employed. At each iteration we attempt to swap one lot size between the account which has the lowest average price and the account which has highest one (this is the Max part of the strategy). The Min part of the strategy comes in place when the executed prices at which the swap is to be made are selected. That is, the system performs some fine tuning and looks for the pair of prices for which the swap will have the least impact on the average price of the pair of accounts concerned. This is shown in Formula (37):

$\begin{matrix} {{{If}\mspace{14mu} \left( {{\max\limits_{j = \overset{\_}{1,n}}\left\{ \Delta_{j} \right\}} - {\min\limits_{j = \overset{\_}{1,n}}\left\{ \Delta_{j} \right\}}} \right)} < {ɛ\left( {0 < ɛ < 1} \right)}} & (37) \end{matrix}$

If Formula (37) is satisfied, then processing stops and the best solution has been found. As with the majority of the heuristic algorithms, the reach of the optimum is not necessarily guaranteed. Nevertheless, Applicant's testing have showed significant and consistent improvements processing at 306 is completed (as compared to the results provided at the end of processing at 304). In this manner, pursuant to some embodiments, a system, method, means and computer program code for determining a pair of accounts between which one lot size has to be swapped, includes operating a Tabu search in the space of solutions, performing a simulated annealing technique in conjunction with the Tabu Search, and combining the two techniques to solve an integer allocation problem.

Processing continues at 308 where the allocation is finalized. For example, processing at 308 may include transmitting an allocation message to a trading system (e.g., such as the system of FIG. 1), or to an entity managing the customer's brokerage accounts so that the allocation can be deployed.

Reference is now made to FIG. 4, where an illustrative allocation system 400 is shown. As described above, the allocation system 400 may be operated in conjunction with, or be a part of, trading system 100 of FIG. 1. As depicted, allocation system 400 includes a computer processor 405 operatively coupled to a communication device 410, a storage device 415, an input device 420 and an output device 425. Communication device 410 may be used to facilitate communication with, for example, other devices (such devices in trading system 100, etc.). Input device 420 may comprise, for example, a keyboard, a keypad, a mouse or other pointing device, a microphone, knob or a switch, an infra-red (IR) port, a docking station, and/or a touch screen. Input device 420 may be used, for example, to enter information (e.g., information regarding routing rules or the like). Output device 425 may comprise, for example, a display (e.g., a display screen), a speaker, and/or a printer.

Storage device 415 may comprise any appropriate information storage device, including combinations of magnetic storage devices (e.g., magnetic tape and hard disk drives), optical storage devices, and/or semiconductor memory devices such as Random Access Memory (RAM) devices and Read Only Memory (ROM) devices.

Storage device 415 stores one or more programs 430 for controlling processor 405. Processor 405 performs instructions of program 430, and thereby operates in accordance with the present invention. In some embodiments, program 430 may be a rule-based engine that the allocation scheme described above in conjunction with FIG. 3. In some embodiments, program 430 may be configured as a neural network or other type of program using techniques known to those skilled in the art to achieve the functionality described herein.

Storage device 415 also stores databases, including, for example, a database 435 storing allocation instructions (received from customers), a database 440 storing trade data (including order data received from trading system 100), and a database 445 storing execution data (from trading system 100). The data from these datastores are used in conjunction with the program to perform the processing of FIG. 3. Other databases and configurations may also be provided.

Although the present invention has been described with respect to a preferred embodiment thereof, those skilled in the art will note that various substitutions may be made to those embodiments described herein without departing from the spirit and scope of the present invention. 

1. A computer implemented method, comprising: allocating a total executed quantity proportionally on a plurality of customer accounts, said allocating based on a pro-rata basis; and constructing an initial solution, distributing the executed prices, wherein at least one of the allocating and constructing is performed using a computer. 2-12. (canceled) 